package com.bestcem.xm.common.core.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @最后更新时间 2021年6月4日15:05:55
 * @desc 运行时异常
 * @date 2021-05-21
 */
@Getter
@Setter
public class BaseRuntimeException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private String code;

    /**
     * 描述信息
     */
    private String desc;

    public BaseRuntimeException(String desc) {
        super(desc);
        this.desc = desc;
    }

    public BaseRuntimeException(String code, String desc) {
        this(desc);
        this.code = code;
    }

    public BaseRuntimeException(String desc, Throwable t) {
        super(desc, t);
        this.desc = desc;
    }

}
